package com.ruoyi.service.impl;

import com.ruoyi.domain.HeartRate;
import com.ruoyi.mapper.HeartRateMapper;
import com.ruoyi.service.HeartRateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName: HeartRateServiceImpl
 * @Description:
 * @author: lifei
 * @date: 2025年01月16日 21:28
 */
@Service
public class HeartRateServiceImpl implements HeartRateService {

    @Autowired
    private HeartRateMapper heartRateMapper;

    @Override
    public List<HeartRate> selectWeekHeartRate(long userId) {
        return heartRateMapper.selectWeekHeartRate(userId);
    }

    /**
     * 获取用户五秒的五次心率数据
     *
     * @param userId
     * @author lifei
     * @Description
     */
    @Override
    public List<HeartRate> selectLastFiveHeartRate(Long userId) {
        return heartRateMapper.selectLastFiveHeartRate(userId);
    }
}
